import { createSlice } from "@reduxjs/toolkit";

export const userDataSlice = createSlice({
    name: 'userData',
    initialState: {
        activePage: "主页"
    },
    reducers: {
        setActivePage: (state, action) => {
            state.activePage = action.payload;
        }
    }
});

export const { setActivePage } = userDataSlice.actions;

export default userDataSlice.reducer;